package com.mpgame.core.utils;

import java.io.IOException;
import java.io.InputStream;

public class FileHelper {
    public static String getFileContent(String path){
        try{
            InputStream is = FileHelper.class.getResourceAsStream("/" + path);
            if(is != null){
                return new String(is.readAllBytes());
            }
            return null;
        }catch(IOException e){
            System.out.println("文件"+path+"阅读失败：" + e.getMessage());
            return null;
        }
    }
}
